<template>
    <div class="home-box">
        <!-- 首页分类列表 start -->
        <div v-for="types in homeData">
            <div class="list-name">
                <span>{{types.typeName}}</span>
                <span class="list-more" @click=" $root.$emit('changePage','films-page') ">更多 > </span>
            </div>
            <!-- <div class="list-content"> -->
            <!-- 电影展示组件 start -->
            <!-- <film-item v-for="(film, index) in types.list" :key="index"
                :film="film"></film-item> -->
            <film-item class="list-content" :films="types.list"></film-item>
            <!-- 电影展示组件 end -->
        </div>
    </div>
</template>
<script src="../datas/home.js"></script>
<script>
    Vue.component("home-page",{
        template:document.currentScript.ownerDocument.querySelector("template"),
        data(){
            return {
                homeData:homeData.result
            }
        }
    });
</script>